package com.lzy;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

@EnableDubbo  // 开始Dubbo注解
@SpringBootApplication
@EnableHystrix // 开启集群容错
public class MainApplication {
//	public static void main(String[] args) {
//		SpringApplication.run(MainApplication.class);
//	}
	public static void main(String[] args) throws IOException {
		ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("provider.xml");
		ioc.start();  // start是ClassPathXmlApplicationContext中的方法
		System.in.read();
	}
}
